PREFIX=/share/calatisiad-project/calatisiad-linux/output
CC = gcc

calatisiad : sqlite3-wrapper.o
	$(CC) -shared -Wl,-soname,libsqlite3-wrapper.so -o libsqlite3-wrapper.so sqlite3-wrapper.o `pkg-config sqlite3 glib-2.0 --cflags --libs`
	mv ./libsqlite3-wrapper.so ${PREFIX}/usr/lib 
	cp ./include/sqlite3-wrapper.h ${PREFIX}/usr/include 
	cp ./sqlite3-wrapper.pc ${PREFIX}/usr/lib/pkgconfig 
sqlite3-wrapper.o : sqlite3-wrapper.c
	$(CC) -c sqlite3-wrapper.c `pkg-config sqlite3 glib-2.0 --cflags --libs`
clean :
	rm ./*.o
	rm ${PREFIX}/usr/include/sqlite3-wrapper.h
	rm ${PREFIX}/usr/lib/libsqlite3-wrapper.so 
	rm ${PREFIX}/usr/lib/pkgconfig/sqlite3-wrapper.pc

